package com.oig.sys.base.dto;


import com.oig.common.constants.CommonEnum;
import com.oig.common.validator.GroupAdd;
import com.oig.common.validator.GroupEdit;
import com.oig.sys.base.constants.SysBaseEnum;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Schema
@Data
public class CustomsDto {

    @Schema(description = "主键id",requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotNull(message = "参数错误,主键id不能为空", groups={GroupEdit.class})
    private Integer id;

    @Schema(description = "海关编码编码 主键，用户自己编，3位", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "参数错误,海关编码编码不能为空", groups={GroupAdd.class, GroupEdit.class})
    @Length(max = 32,min = 3, message = "参数错误,海关编码编码3-32位", groups={GroupAdd.class,GroupEdit.class})
    private String customsCode;

    @Schema(description = "名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "参数错误,名称不能为空", groups={GroupAdd.class,GroupEdit.class})
    private String customsName;

    @Schema(description = "国别地区编码")
    private String countryCode;
    @Schema(description = "国别地区名称")
    private String countryName;
    @Schema(description = "SAP维护的国别地区编码")
    private String countryApplyCode;

    @Schema(description = "所属城市")
    private String cityCode;
    @Schema(description = "城市名称")
    private String cityName;

//    @Schema(description = "所辖所有港口，多个用‘,’分割")
//    private String harborCode;

    @Schema(description = "状态")
    private String status;

    @Schema(description = "排序号")
    private Integer sort=0 ;

    @Schema(description = "原编码")
    private String oldCode;

    @Schema(description = "单证申请-特殊处理标识 1-是；0-否")
    private String specialApplyFlag;

    @Schema(description = "检疫证要求")
    private SysBaseEnum.QuarantineRequirement quarantineRequirement;

    @Schema(description = "删单重报是否重算税费")
    private CommonEnum.FlagEnum recountTax;

    @Schema(description = "境外发货人类型")
    private SysBaseEnum.OverseasSenderType overseasSenderType;


    /**
     * 为了对接海关申报用
     */
    @Schema(description = "默认境内目的地代码")
    private String innerAddressCode;
    @Schema(description = "默认境内目的地名称")
    private String innerAddressName;
    @Schema(description = "默认目的地地区代码")
    private String innerAreaCode;
    @Schema(description = "默认目的地地区名称")
    private String innerAreaName;
    @Schema(description = "名称/编码")
    private String searchWord;

    @Schema(description = "港口编码")
    private String portCode;

    @Schema(description = "港口名称")
    private String portName;
}
